package com.bgds.sys.module.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author lj
 * @since 2020-01-06
 */
@Data
@TableName("bgds_device_dynamic_attr")
@ApiModel(value = "设备动态属性")
public class DeviceDynamicAttr implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "唯一标识",dataType = "Integer")
    private Long id;

    /**
     * 设备编码
     */
    @TableField("device_code")
    @ApiModelProperty(value = "设备编码")
    private String deviceCode;



    /**
     * 名称
     */
    @TableField("name")
    @ApiModelProperty(value = "名称")

    private String name;



    /**
     * 英文名称
     */
    @TableField("eng_name")
    @ApiModelProperty(value = "英文名称")
    private String engName;

    /**
     * 英文名称
     */
    @TableField("measurement")
    @ApiModelProperty(value = "influx表名")
    private String measurement;
    /**
     * 是否转换
     */
    @TableField("convert_to")
    @ApiModelProperty(value = "是否转换")
    private Integer convertTo;
    /**
     * 数据类型
     */
    @TableField("type")
    @ApiModelProperty(value = "数据类型")
    private String type;

    @TableField("fixed_length")
    @ApiModelProperty(value = "固定长度")
    private Integer fixedLength;

    @TableField("accuracy")
    @ApiModelProperty(value = "精度")
    private Integer accuracy;

    @TableField("seq_number")
    @ApiModelProperty(value = "对应电文序号")
    private Integer seqNumber;

    @TableField("msg_key")
    @ApiModelProperty(value = "电文号")
    private String msgKey;

    @ApiModelProperty(value = "一级上限报警阈值")
    @TableField(value = "one_top_limit")
    private Float oneTopLimit;

    @ApiModelProperty(value = "二级上限报警阈值")
    @TableField(value ="two_top_limit")
    private Float twoTopLimit;

    @ApiModelProperty(value = "三级上限报警阈值")
    @TableField(value ="three_top_limit")
    private Float threeTopLimit;

    @ApiModelProperty(value = "一级下限报警阈值")
    @TableField(value ="one_low_limit")
    private Float oneLowLimit;

    @ApiModelProperty(value = "二级下限报警阈值")
    @TableField(value ="two_low_limit")
    private Float twoLowLimit;

    @ApiModelProperty(value = "三级下限报警阈值")
    @TableField(value ="three_low_limit")
    private Float threeLowLimit;

    @ApiModelProperty(value = "是否阈值报警")
    @TableField("alarm_flag")
    private Boolean alarmFlag;

    @ApiModelProperty(value = "判断报警阈值的类型 0:上限 1:下限 2:范围")
    @TableField("judge_type")
    private Integer judgeType;

    @ApiModelProperty(value = "是否删除")
    @TableField("is_del")
    private Integer isDel;


    @ApiModelProperty(value = "报警状态: 0正常，1异常")
    @TableField("alarm_status")
    private Integer alarmStatus;


    @ApiModelProperty(value = "现值")
    @TableField("current_value")
    private Double currentValue;


    /**
     * 单位
     */
    @TableField("unit")
    @ApiModelProperty(value = "单位")
    private String unit;

    /**
     * 组编码
     */
    @TableField("alarm_filter")
    @ApiModelProperty(value = "报警属性过滤字段")
    private String alarmFilter;

    /**
     * 组编码
     */
    @TableField("group_code")
    @ApiModelProperty(value = "分组编码")
    private String groupCode;

    /**
     * 页面过滤编码
     */
    @TableField("filter_code")
    @ApiModelProperty(value = "页面过滤编码")
    private String filterCode;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField("update_time")
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;



}
